<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/head.css">
    <link rel="stylesheet" href="../css/foot.css">
    <link rel="stylesheet" href="../css/xiangqingye.css">
</head>

<body>
    <div class="head"></div>
    <div>
        <div class="goodsdetail">
            <div class="container-1200">
                <div class="navigation-text">
                    <a href="">商品分类</a> >
                    <a href="">空气制水机</a> >
                    <span>福能达 KARC-50LROA 温热 空气制水机</span>
                </div>
                <div class="goods-info clearfix1">
                    <div class="left-box">
                        <div class="img-box bigbox">
                            <img src="../image/a1.jpg" alt="福能达 KARC-50LROA 温热 空气制水机" class="show">
                            <div class="showbox"></div>
                        </div>
                        <div class="showlarge">
                            <img src="../image/a1.jpg">
                        </div>
                        <div class="goods-list-img clearfix2">
                            <div class="img-box  ">
                                <img src="../image/a1.jpg" class="img1" alt="福能达 KARC-50LROA 温热 空气制水机">
                            </div>
                            <div class="img-box ">
                                <img src="../image/a2.jpg" class="img2" alt="福能达 KARC-50LROA 温热 空气制水机">
                            </div>
                            <div class="img-box ">
                                <img src="../image/a3.jpg" class="img3" alt="福能达 KARC-50LROA 温热 空气制水机">
                            </div>
                            <div class="img-box ">
                                <img src="../image/a4.jpg" class="img4" alt="福能达 KARC-50LROA 温热 空气制水机">
                            </div>
                            <div class="img-box ">
                                <img src="../image/a5.jpg" class="img5" alt="福能达 KARC-50LROA 温热 空气制水机">
                            </div>
                        </div>
                        <div class="other clearfix">
                            <span class="icon-text icon-sc">收藏</span>
                        </div>
                    </div>
                    <div class="right-box">
                        <p class="gname">福能达 KARC-50LROA 温热 空气制水机</p>
                        <p class="gdesc">空气制水 无需水源 </p>
                        <div class="price">
                            <span class="text-1">折后价  ￥</span>
                            <span class="text-2">13800.00</span>
                        </div>
                        <div class="old-price">
                            <span class="text-1">原价  ￥13800.00</span>
                            <span class="text-2">已为您节省了 0 元</span>
                        </div>
                        <div class="parameter">
                            <span class="text-1">规格</span>
                            <span class="text-2">台</span>
                        </div>
                        <div class="num">
                            <span class="text-1">数量</span>
                            <div class="count">
                                <span class="minus">-</span>
                                <input type="tel" value="1">
                                <span class="add">+</span>
                            </div>
                            <span class="text-2">库存还剩下90台</span>
                        </div>
                        <br>
                        <div class="btn-box">
                            <span class="btn-line">立即购买</span>
                            <span class="btn">加入购物车</span>
                        </div>
                    </div>
                </div>
                <div class="goods-detail-bottom">
                    <div class="bottom-nav">
                        <div class="left-btn">
                            <span class="btn-item active">商品详情</span>
                            <span class="btn-item">为什么选择福能达</span>
                            <span class="btn-item">售后保障</span>
                            <span class="btn-item">商品评价</span>
                        </div>
                        <span class="btn">收藏</span>
                    </div>
                    <div class="detail-content">
                        <div>
                            <p style="text-align: center; ">
                                <img src="../image/a6.jpg" alt="" width="790" height="803"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a7.jpg" alt="" width="790" height="701"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a8.jpg" alt="" width="790" height="994"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a10.jpg" alt="" width="790" height="857"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a20.jpg" alt="" width="790" height="723"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a11.jpg" alt="" width="790" height="891"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a12.jpg" alt="" width="790" height="899"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a13.jpg" alt="" width="790" height="904"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a14.jpg" alt="" width="790" height="871"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a15.jpg" alt="" width="790" height="824"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a16.jpg" alt="" width="790" height="831"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a17.jpg" alt="" width="790" height="1048"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a18.jpg" alt="" width="790" height="988"></p>
                            <p style="text-align: center; ">
                                <img src="../image/a19.jpg" alt="" width="790" height="770"></p>
                            <p style="text-align: center; ">
                                &nbsp;</p>
                            <p style="text-align: center; ">
                                <audio style="display: none;" controls="controls" data-mce-fragment="1"></audio></p>
                        </div>
                    </div>

                    <div class="evaluate-box">
                        <div class="evaluate-title">
                            <span>商品评价</span>
                        </div>
                        <div class="nodata-box">
                            <img src="../image/pingjia.png" alt="">
                            <p></p>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <footer></footer>
</body>

</html>
<script src="../js/node_modules/_jQuery@1.7.4@jQuery/tmp/jquery.js"></script>

<script>
    $(".head").load("head.html header", function() {});

    $("footer").load("foot.html .footer", function() {})
</script>
<script src="../js/fangdajing.js"></script>
<script src="../js/xiangqingye.js"></script>

<script>
    //点击加减号可以加减
    $(".add").click(function() {
        $(this).prev().val($(this).prev().val() / 1 + 1);
    });

    $(".minus").click(function() {
        if ($(this).next().val() > 1) {
            $(this).next().val($(this).next().val() - 1);
        }
    });

    let url = location.href;
    let index = url.indexOf("00");
    let username = localStorage.getItem("loginphone")
    console.log(username)
    let shopId = url.substring(index, +index + 4);

    $(".btn-box .btn").click(function() {

        // console.log(shopId)
        $.post("../goodsAndShoppingCart/addShoppingCart.php", {
            "goodsId": shopId,

            "vipName": username,
            "goodsImg": $(".bigbox img").html(),
            // "goodsName": $(".gname").html(),
            "beiyong4": $(".gdesc").html(),
            "beiyong6": $(".navigation-text").children().eq(1).html(),
            "goodsCount": $(".count").children().eq(1).val(),
            "goodsPrice": $(".price .text-2").html()
        }).then(function(resText) {
            console.log(resText)
            alert("添加成功")
        })
    })
    $(".btn-box .btn-line").click(function() {
        location.href = "jiesuan.html?id=" + username;
    })
</script>